<template>
  <div class="member-info">
    <el-form label-width="90px"
      ref="form">
      <el-row>
        <el-col :span="6">
          <div class="input-wrap"
            style="margin-top:10px">
            <el-form-item label="ID：">
              <span>{{form.id}}</span>
            </el-form-item>
          </div>
          <div class="input-wrap">
            <el-form-item label="姓名：">
              <span>{{form.name}}</span>
            </el-form-item>
          </div>
          <div class="input-wrap">
            <el-form-item label="手机号码：">
              <span>{{form.phone}}</span>
            </el-form-item>
          </div>
          <div class="input-wrap">
            <el-form-item label="出生日期：">
              <span>{{form.birthday}}</span>
            </el-form-item>
          </div>
          <div class="input-wrap">
            <el-form-item label="注册时间：">
              <span>{{form.createTime}}</span>
            </el-form-item>
          </div>

        </el-col>
        <el-col :span="6">
          <div class="input-wrap"
            style="margin-top:10px">
            <el-form-item label="登录名：">
              <span>{{form.nickName}}</span>
            </el-form-item>
          </div>
          <div class="input-wrap">
            <el-form-item label="邮箱：">
              <span>{{form.email}}</span>
            </el-form-item>
          </div>
          <div class="input-wrap">
            <el-form-item label="性别：">
              <span>{{form.sex}}</span>
            </el-form-item>
          </div>
          <div class="input-wrap">
            <el-form-item label="客户来源：">
              <span>{{form.parentCN}}</span>
            </el-form-item>
          </div>
          <div class="input-wrap">
            <el-form-item label="会员等级：">
              <span>{{form.className}}</span>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
    </el-form>
    <div class="information-btn">
      <el-form-item>
        <el-button @click="back">返回</el-button>
      </el-form-item>
    </div>
  </div>
</template>
<script>
import { queryMemberById, updateMember } from "@/public/js/member";

export default {
  token: "",
  data() {
    return {
      form: {},
      id: ""
    };
  },
  created() {
    this.id = this.$route.query.id;
    this.getMemberInfo();
  },
  methods: {
    getMemberInfo() {
      queryMemberById({ id: this.id }).then(res => {
        if (!res.data.errCode) {
          this.form = res.data.userUserinfo;
          this.platformList = res.data.platformList;
          this.hobbyInterest = res.data.hobbyInterest;
          this.hobbyRepast = res.data.hobbyRepast;
          this.channelList = res.data.channelList;
          this.sourceList = res.data.sourceList;
          console.log(this.platformList);
        }
      });
    },
    back() {
      this.$router.back();
    }
  }
};
</script>
<style lang="scss">
.member-info {
  .el-form-item__label {
    font-weight: bold;
  }
}
</style>
